#ifndef GRAVITY_H_INCLUDED
#define GRAVITY_H_INCLUDED

#include <iostream>
#include <windows.h>

using namespace std;


void gravity(double speed = 0, double dist = 0, double time = 0, double max = 200, double gravity = 9.81)
{

    if (speed > max)
        speed = max;

    time++;
    speed += gravity;
    dist = 0.5 * speed * time;
    cout << speed << "\t" << dist << "\t\t" << time << endl;

    Sleep (1000);
}

#endif // GRAVITY_H_INCLUDED
